<script type="text/javascript" src="javascript/ajax/prototype.js"></script>
<link rel="stylesheet" type="text/css" href="modules/IShopStore/pnjavascript/ddtabmenu/ddtabmenufiles/ddcolortabs_blue.css" />
</style>

<script type="text/javascript">
  function validateForm(form) {

    //Check bank name
    var bank_name = document.getElementById("form_payment_bank_name_");
    if (bank_name.selectedIndex == 0) {
        alert("Please select bank name.");
        bank_name.style.background = 'PowderBlue';
        bank_name.focus();
        return false;
    }

    //Check bank branch
    var bank_branch = document.getElementById("form_payment_bank_branch_");
    if (bank_branch.value == '') {
        alert("Please Enter bank branch.");
        bank_branch.style.background = 'PowderBlue';
        bank_branch.focus();
        return false;
    }

    //Check account name
    var account_name = document.getElementById("form_bank_account_name_");
    if (account_name.value == '') {
        alert("Please Enter account name.");
        account_name.style.background = 'PowderBlue';
        account_name.focus();
        return false;
    }

    //Check account type
    var account_type = document.getElementById("form_payment_bank_account_type_");
    if (account_type.selectedIndex == 0) {
        alert("Please select account type.");
        account_type.style.background = 'PowderBlue';
        account_type.focus();
        return false;
    }


    //Check account name


    var account_no = document.getElementById("form_payment_bank_account_no_");
    if (account_no.selectedIndex == 0) {
        alert("Please Enter account no.");
        account_no.style.background = 'PowderBlue';
        account_no.focus();
        return false;
    }


  }
</script>




<h4 class="innodocument-head">ส่งข้อความติดต่อเรา</h4>

<form id='form' class='form' action="<!--[pnmodurl modname='IShopStore' type='adminform' func='submit' ctrl='Contactus']-->" method="post" enctype="multipart/form-data" onsubmit="return validateForm(this)">
<input type="hidden" name="form[id]" value="<!--[$_GET.id]-->" />
<input type="hidden" name="forward[modname]" value="IShopStore" />
<input type="hidden" name="forward[func]" value="form" />
<input type="hidden" name="forward[ctrl]" value="Contactus" />

<TABLE width='50%' border="0" class="innoadvert-table">
<TR  >
  <TD class='td-label' width='30%'>ชื่อ</TD>
  <TD><input name="form[name]" 
                 id="form_payment_bank_branch_" 
                 type="text" 
                 size="40" 
                 value="<!--[$form.name]-->" />
  </TD>
</TR>
<tr>
  <td class='td-label' >E-Mail</td>
  <td class='td-data' ><input name="form[email]" 
                 id="form_payment_bank_branch_" 
                 type="text" 
                 size="40" 
                 value="<!--[$form.email]-->" /></td>
</tr>
<tr>
  <td class='td-label' >โทรศัพท์</td>
  <td class='td-data' ><input name="form[phone]" 
                 id="form_bank_account_name_" 
                 type="text" 
                 size="40" 
                 value="<!--[$form.phone]-->" /></td>
</tr>
<tr>
  <td class='td-label' >เรื่อง</td>
  <td class='td-data' ><input name="form[headline]" 
                 id="form_bank_account_name_" 
                 type="text" 
                 size="40" 
                 value="<!--[$form.headline]-->" />
   
  </td>
</tr>
<tr>
  <td class='td-label' >รายละเอียด</td>
  <td class='td-data' >
      <textarea name="form[message]" rows="5" cols="50"><!--[$form.message]--></textarea>
  </td>
</tr>
<TR>
  <TD></TD>
  <TD><!--[if $form.id]--><INPUT TYPE="submit" value='Update' name='Update' type="submit" >&nbsp;&nbsp;<!--[/if]-->
      <!--[if $form.id==null]--><INPUT TYPE="submit" value='Submit' name='Submit' type="submit" >&nbsp;&nbsp;<!--[/if]--></TD>
</TR>
</TABLE>

</form>
